package netjava.Action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import netjava.Dao.BlogDao;
import netjava.Interface.Action;
import netjava.pojo.Bloginfo;

public class DisplayAction implements Action {

	public String execute(HttpServletRequest request,
			HttpServletResponse response) {
		int id=Integer.parseInt(request.getParameter("Id"));
		BlogDao dao=new BlogDao();
		Bloginfo blog=dao.display(id);
		request.getSession().setAttribute("blog", blog);
		return "/display.jsp";
	}

}
